﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace RiskMan.DataClass.Models.Sterling
{
    public class SterlingTradeTableItem : INotifyPropertyChanged
    {
        #region private

        #region string

        private string _account;
        private string _action;
        private string _batchId;
        private string _clOrderId;
        private string _contra;
        private string _coverUncover;
        private string _destination;
        private string _exchClOrderId;
        private string _exchOrderId;
        private string _exchOrderId2;
        private string _execBroker;
        private string _execInst;
        private string _instrument;
        private string _liquidity;
        private string _logMessage;
        private string _maturity;
        private string _openClose;
        private string _orderTime;
        private string _putCall;
        private string _side;
        private string _specialist;
        private string _symbol;
        private string _tif;
        private string _tradeTime;
        private string _underlying;
        private string _updateTime;
        private string _userId;

        #endregion

        #region double

        private double _descretion;
        private double _execPrice;
        private double _lmtPrice;
        private double _pegDiff;
        private double _stpPrice;
        private double _strikePrice;

        #endregion

        #region long

        private long _dbsNo;
        private long _lvsQuantity;
        private long _orderRecondId;
        private long _priceType;
        private long _quantity;
        private long _seqNo;
        private long _tradeRecordId;

        #endregion

        #region double

        private double _clearable;
        private double _ecnFee;

        #endregion

        #endregion

        #region public

        #region string

        /// <summary>
        /// 
        /// </summary>
        public string Account
        {
            get { return _account; }
            set
            {
                if (_account != value)
                {
                    _account = value;
                    RaisePropertyChanged("Account");
                }
            }
        }

        /// <summary>
        /// ‘A’= Add, ‘C’= Change, ‘D’=Delete
        /// </summary>
        public string Action
        {
            get { return _action; }
            set
            {
                if (_action != value)
                {
                    _action = value;
                    RaisePropertyChanged("Action");
                }
            }
        }

        /// <summary>
        /// Used by Order Dest to associate a group of orders
        /// </summary>
        public string BatchId
        {
            get { return _batchId; }
            set
            {
                if (_batchId != value)
                {
                    _batchId = value;
                    RaisePropertyChanged("BatchId");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string ClOrderId
        {
            get { return _clOrderId; }
            set
            {
                if (_clOrderId != value)
                {
                    _clOrderId = value;
                    RaisePropertyChanged("ClOrderId");
                }
            }
        }

        /// <summary>
        /// Contra broker
        /// </summary>
        public string Contra
        {
            get { return _contra; }
            set
            {
                if (_contra != value)
                {
                    _contra = value;
                    RaisePropertyChanged("Contra");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string CoverUncover
        {
            get { return _coverUncover; }
            set
            {
                if (_coverUncover != value)
                {
                    _coverUncover = value;
                    RaisePropertyChanged("CoverUncover");
                }
            }
        }


        /// <summary>
        /// 
        /// </summary>
        public string Destination
        {
            get { return _destination; }
            set
            {
                if (_destination != value)
                {
                    _destination = value;
                    RaisePropertyChanged("Destination");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string ExchClOrderId
        {
            get { return _exchClOrderId; }
            set
            {
                if (_exchClOrderId != value)
                {
                    _exchClOrderId = value;
                    RaisePropertyChanged("ExchClOrderId");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string ExchOrderId
        {
            get { return _exchOrderId; }
            set
            {
                if (_exchOrderId != value)
                {
                    _exchOrderId = value;
                    RaisePropertyChanged("ExchOrderId");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string ExchOrderId2
        {
            get { return _exchOrderId2; }
            set
            {
                if (_exchOrderId2 != value)
                {
                    _exchOrderId2 = value;
                    RaisePropertyChanged("ExchOrderId2");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string ExecBroker
        {
            get { return _execBroker; }
            set
            {
                if (_execBroker != value)
                {
                    _execBroker = value;
                    RaisePropertyChanged("ExecBroker");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string ExecInst
        {
            get { return _execInst; }
            set
            {
                if (_execInst != value)
                {
                    _execInst = value;
                    RaisePropertyChanged("ExecInst");
                }
            }
        }


        /// <summary>
        /// 
        /// </summary>
        public string Instrument
        {
            get { return _instrument; }
            set
            {
                if (_instrument != value)
                {
                    _instrument = value;
                    RaisePropertyChanged("Instrument");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string Liquidity
        {
            get { return _liquidity; }
            set
            {
                if (_liquidity != value)
                {
                    _liquidity = value;
                    RaisePropertyChanged("Liquidity");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string LogMessage
        {
            get { return _logMessage; }
            set
            {
                if (_logMessage != value)
                {
                    _logMessage = value;
                    RaisePropertyChanged("LogMessage");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string Maturity
        {
            get { return _maturity; }
            set
            {
                if (_maturity != value)
                {
                    _maturity = value;
                    RaisePropertyChanged("Maturity");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string OpenClose
        {
            get { return _openClose; }
            set
            {
                if (_openClose != value)
                {
                    _openClose = value;
                    RaisePropertyChanged("OpenClose");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string OrderTime
        {
            get { return _orderTime; }
            set
            {
                if (_orderTime != value)
                {
                    _orderTime = value;
                    RaisePropertyChanged("OrderTime");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string PutCall
        {
            get { return _putCall; }
            set
            {
                if (_putCall != value)
                {
                    _putCall = value;
                    RaisePropertyChanged("PutCall");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string Side
        {
            get { return _side; }
            set
            {
                if (_side != value)
                {
                    _side = value;
                    RaisePropertyChanged("Side");
                }
            }
        }


        /// <summary>
        /// 
        /// </summary>
        public string Specialist
        {
            get { return _specialist; }
            set
            {
                if (_specialist != value)
                {
                    _specialist = value;
                    RaisePropertyChanged("Specialist");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string Symbol
        {
            get { return _symbol; }
            set
            {
                if (_symbol != value)
                {
                    _symbol = value;
                    RaisePropertyChanged("Symbol");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string Tif
        {
            get { return _tif; }
            set
            {
                if (_tif != value)
                {
                    _tif = value;
                    RaisePropertyChanged("Tif");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string TradeTime
        {
            get { return _tradeTime; }
            set
            {
                if (_tradeTime != value)
                {
                    _tradeTime = value;
                    RaisePropertyChanged("TradeTime");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string Underlying
        {
            get { return _underlying; }
            set
            {
                if (_underlying != value)
                {
                    _underlying = value;
                    RaisePropertyChanged("Underlying");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string UpdateTime
        {
            get { return _updateTime; }
            set
            {
                if (_updateTime != value)
                {
                    _updateTime = value;
                    RaisePropertyChanged("UpdateTime");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string UserId
        {
            get { return _userId; }
            set
            {
                if (_userId != value)
                {
                    _userId = value;
                    RaisePropertyChanged("UserId");
                }
            }
        }

        #endregion

        #region double

        /// <summary>
        /// 
        /// </summary>
        public double Descretion
        {
            get { return _descretion; }
            set
            {
                if (_descretion != value)
                {
                    _descretion = value;
                    RaisePropertyChanged("Descretion");
                }
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public double ExecPrice
        {
            get { return _execPrice; }
            set
            {
                if (_execPrice != value)
                {
                    _execPrice = value;
                    RaisePropertyChanged("ExecPrice");
                }
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public double LmtPrice
        {
            get { return _lmtPrice; }
            set
            {
                if (_lmtPrice != value)
                {
                    _lmtPrice = value;
                    RaisePropertyChanged("LmtPrice");
                }
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public double PegDiff
        {
            get { return _pegDiff; }
            set
            {
                if (_pegDiff != value)
                {
                    _pegDiff = value;
                    RaisePropertyChanged("PegDiff");
                }
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public double StpPrice
        {
            get { return _stpPrice; }
            set
            {
                if (_stpPrice != value)
                {
                    _stpPrice = value;
                    RaisePropertyChanged("StpPrice");
                }
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public double StrikePrice
        {
            get { return _strikePrice; }
            set
            {
                if (_strikePrice != value)
                {
                    _strikePrice = value;
                    RaisePropertyChanged("StrikePrice");
                }
            }
        }

        #endregion

        #region long

        /// <summary>
        /// Database number
        /// </summary>
        public long DbsNo
        {
            get { return _dbsNo; }
            set
            {
                if (_dbsNo != value)
                {
                    _dbsNo = value;
                    RaisePropertyChanged("DbsNo");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public long LvsQuantity
        {
            get { return _lvsQuantity; }
            set
            {
                if (_lvsQuantity != value)
                {
                    _lvsQuantity = value;
                    RaisePropertyChanged("LvsQuantity");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public long OrderRecondId
        {
            get { return _orderRecondId; }
            set
            {
                if (_orderRecondId != value)
                {
                    _orderRecondId = value;
                    RaisePropertyChanged("OrderRecondId");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public long PriceType
        {
            get { return _priceType; }
            set
            {
                if (_priceType != value)
                {
                    _priceType = value;
                    RaisePropertyChanged("PriceType");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public long Quantity
        {
            get { return _quantity; }
            set
            {
                if (_quantity != value)
                {
                    _quantity = value;
                    RaisePropertyChanged("Quantity");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public long SeqNo
        {
            get { return _seqNo; }
            set
            {
                if (_seqNo != value)
                {
                    _seqNo = value;
                    RaisePropertyChanged("SeqNo");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public long TradeRecordId
        {
            get { return _tradeRecordId; }
            set
            {
                if (_tradeRecordId != value)
                {
                    _tradeRecordId = value;
                    RaisePropertyChanged("TradeRecordId");
                }
            }
        }

        #endregion

        #region double


        /// <summary>
        /// 
        /// </summary>
        public double Clearable
        {
            get { return _clearable; }
            set
            {
                if (_clearable != value)
                {
                    _clearable = value;
                    RaisePropertyChanged("Clearable");
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public double EcnFee
        {
            get { return _ecnFee; }
            set
            {
                if (_ecnFee != value)
                {
                    _ecnFee = value;
                    RaisePropertyChanged("EcnFee");
                }
            }
        }

        #endregion

        #endregion

        #region event PropertyChangedEventHandler

        public event PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion
    }
}
